# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=dnstwist
pkgver=645.3413953
pkgrel=1
groups=('blackarch' 'blackarch-scanner' 'blackarch-recon')
pkgdesc='Domain name permutation engine for detecting typo squatting, phishing and corporate espionage.'
arch=('any')
url='https://github.com/elceef/dnstwist'
license=('custom:unknown')
depends=('python' 'python-geoip' 'python-dnspython' 'python-requests'
         'python-ppdeep' 'python-python-whois' 'python-tld')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/elceef/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

